package com.mybatislearn.mapper;

import com.mybatislearn.pojo.User;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author wangzd
 * @create 2021-10-17 17:19
 */
@CacheNamespace
public interface UserMapper {

    @Select("select * from user where id = #{id}" )
    User queryNameById(int id);

    @Update("update user set name = #{arg1} where id = #{arg0}")
    int updateName(int id, String name);

}
